package service;

import java.util.List;

import com.kaishengit.dao.BookTypeDao;
import com.kaishengit.entity.BookType;
import com.kaishengit.util.StringUtil;

public class BookTypeService {
	private BookTypeDao dao=new BookTypeDao();
	
	public void addType(String typeName) {
		BookType bookType = new BookType();
		bookType.setId(StringUtil.getId());
		bookType.setTypeName(typeName);
		
		dao.save(bookType);
	}

	public List<BookType> selectAll() {
		return dao.selectAll();
	}

}
